[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
gety() Get the Current Position's y Coordinate
#include <graphics.h>
int far gety(void);
gety() gets the current position's (CP) y coordinate relative to the
current viewport.
Returns: The current position's y coordinate.
-------------------------------- Example ---------------------------------
The following statements get the current position's x and y
coordinates and draw lines out from that point.
#include <graphics.h>
#include <conio.h>
int gdriver = DETECT;
int gmode;
main()
{
int x0, y0;
initgraph(&gdriver,&gmode,"");
x0 = getx();
y0 = gety();
linerel(100,200);
moveto(x0,y0);
linerel(200,200);
moveto(x0,y0);
linerel(300,200);
getch();
closegraph();
}
See Also:
getx()
moveto()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson